﻿@model TimeTracker.Models.EntryModel

@{
    var id = string.Format("entry{0}", Model.Id);
}

<div id="@id">
    <div class="entry" id="@Model.Id"> 
    <form>
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.UserId)
        @Html.HiddenFor(model => model.ProjectId)
        @Html.HiddenFor(model => model.ClientId)
        @Html.HiddenFor(model => model.LastStartTime)
        @Html.HiddenFor(model => model.IsActive)

        <div class="description">@Html.EditorFor(model => model.Description)</div>
        <div class="elapsed">@Html.EditorFor(model => model.ElapsedTime)</div>
        <div class="client"><input class="text-box single-line" id="Client" name="Client" type="text" value="Corvalius" readonly /></div>
        <div class="project"><input class="text-box single-line" id="Project" name="Project" type="text" value="Codecamp" readonly /></div>


        <div class="buttons">
            @if(!String.IsNullOrEmpty(Model.Id)) {
                <a href="#nowhere" class="saveButton">save</a>
                <a href="#nowhere" class="cancelButton">cancel</a>
            }
            else
            {
                <a href="#nowhere" class="createButton">create</a>
            }
        </div>
    </form>
    </div> 
</div>